import request from '@/utils/request'

// 查询设备库存列表
export function listDeviceInventory(query) {
  return request({
    url: '/device/deviceInventory/list',
    method: 'get',
    params: query
  })
}

// 查询设备库存详细
export function getDeviceInventory(id) {
  return request({
    url: '/device/deviceInventory/' + id,
    method: 'get'
  })
}

// 查询入库设备编号列表
export function deviceInventoryCodes(query) {
  return request({
    url: '/device/deviceInventoryCodes/list',
    method: 'get',
    params:query
  })
}

// 新增设备库存
export function addDeviceInventory(data) {
  return request({
    url: '/device/deviceInventory',
    method: 'post',
    data: data
  })
}

// 修改设备库存
export function updateDeviceInventory(data) {
  return request({
    url: '/device/deviceInventory/append',
    method: 'post',
    data: data
  })
}

// 删除设备库存
export function delDeviceInventory(id) {
  return request({
    url: '/device/deviceInventory/' + id,
    method: 'delete'
  })
}

// 修改设备库存编号
export function updateDeviceInventoryCode(data) {
  return request({
    url: '/device/deviceInventoryCodes',
    method: 'put',
    data: data
  })
}

// 固件列表
export function firmwareUpgradeList(data) {
  return request({
    url: '/firmware/firmwareUpgrade/options',
    method: 'get',
    data: data
  })
}

